pub fn new_birthday_probability(n: u32) -> f64 {
    if n < 2 {
        return 0.0000;
    }

    // 初始化没有生日相同的概率为1
    let mut no_shared_birthday = 1.0;
    let days = 365.0;

    for i in 0..n {
        no_shared_birthday *= (days - i as f64) / days;
    }

    // 至少有两人生日相同的概率
    let probability_shared_birthday = 1.0 - no_shared_birthday;

    // 保留四位小数
    (probability_shared_birthday * 10000.0).round() / 10000.0
}
